package com.itzyf.pokemondata.bean;

import com.avos.avoscloud.AVObject;

import org.litepal.crud.LitePalSupport;

import java.util.Date;

/**
 * @author 依风听雨
 * @version 创建时间：2019/06/03 08:54
 */
public class DbCharacteristicDo extends LitePalSupport {
    private Date updatedAt;
    private String objectId;
    private Date createdAt;
    private long id;

    private String explain;
    private String cname;

    private String detail;

    public DbCharacteristicDo() {
    }

    public DbCharacteristicDo(CharacteristicJsonDo jsonDo) {
        objectId = jsonDo.getObjectId();
        updatedAt = jsonDo.getUpdatedAt();
        createdAt = jsonDo.getCreatedAt();
        explain = jsonDo.getExplain();
        cname = jsonDo.getCname();
        detail = jsonDo.getDetail();
    }

    public DbCharacteristicDo(AVObject jsonDo) {
        objectId = jsonDo.getObjectId();
        updatedAt = jsonDo.getUpdatedAt();
        createdAt = jsonDo.getCreatedAt();
        explain = jsonDo.getString("explain");
        cname = jsonDo.getString("cname");
        detail = jsonDo.getString("detail");
    }

    public String getDetail() {
        return detail == null ? "" : detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getObjectId() {
        return objectId == null ? "" : objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getExplain() {
        return explain == null ? "" : explain;
    }

    public void setExplain(String explain) {
        this.explain = explain;
    }

    public String getCname() {
        return cname == null ? "" : cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

}
